﻿using ZilLion.Service.Core.DapperWrapper;
using ZilLion.Service.WeChatMall.Domain.Entitys.AppInfo;

namespace ZilLion.Service.WeChatMall.Domain.Repositorys.Interface.AppInfo
{
    public interface IAppGsRelationShipReponsitory
    {
        /// <summary>
        ///     根据appid 删除关系
        /// </summary>
        /// <param name="appid"></param>
        /// <param name="unit"></param>
        void RemoveRelationShipByAppId(string appid, UnitOfWork unit = null);

        /// <summary>
        ///     根据gsid 删除数据
        /// </summary>
        /// <param name="gsid"></param>
        void RemoveByGsid(long gsid, UnitOfWork unit = null);

        /// <summary>
        ///     建立关系
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void AddRelationShip(AppGsRelationShipEntity entity, UnitOfWork unit = null);

        /// <summary>
        ///     取消关系
        /// </summary>
        /// <param name="entity"></param>
        /// <param name="unit"></param>
        void RemoveRelationShip(AppGsRelationShipEntity entity, UnitOfWork unit = null);
    }
}